{% extends "contact__lists_nav.html" %}

{% block content %}
<div>

<table class='cbv_index'>

<tr>
<th> Edit Link </th>
<th> Firstname </th>
<th> Lastname </th>
<th> Phones </th>
{# <th> Referring Organisation </th>#}
<th> Sales </th>
<th> Contact id </th>
<th> Recipient id </th>
</tr>

{% for contact_and_recipient in contacts_and_recipients_list %}
  <tr class="{% cycle odd_row,even_row %}">
   <td> 
   <a href = "{% url wjContact.contacts.views.recipient_edit main_object_id=contact_and_recipient.1.id %}">  
     {{ contact_and_recipient.1 }}    
   </a> 
   </td>  
   <td> {{ contact_and_recipient.0.first_name }} </td>
   <td> {{ contact_and_recipient.0.last_name }} </td>
        
   <td>
     
      {% for phone in contact_and_recipient.0.get_my_phones %}
        {{ phone.phone_number }} 
      {% endfor %}
    
   </td>
   <td> {{ contact_and_recipient.1.referring_org }} </td>  
   <td> {{ sales }} </td>  
   <td> {{ contact_and_recipient.0.id }} </td>  
   <td> {{ contact_and_recipient.1.id }} </td>      
  </tr>
{% endfor %}
</table>
</div>
{% endblock content %}
